package cn.easier.activity.console.service.impl;

import cn.easier.activity.console.repository.ActivityRecordStatisticsRepository;
import cn.easier.activity.console.service.ActivityRecordStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 活动记录统计 ServiceImpl
 */
@Service
@Transactional
public class ActivityRecordStatisticsServiceImpl implements ActivityRecordStatisticsService {

    @Autowired
    ActivityRecordStatisticsRepository activityRecordStatisticsRepository;

    @Override
    public int countActivityCouponCodeRecordByPhoneNum(String phoneNum) {
        return activityRecordStatisticsRepository.countActivityCouponCodeRecordByPhoneNum(phoneNum);
    }

    @Override
    public Object[] findActivityCouponCodeRecordsByPhoneNum(String phoneNum, int pageIndex, int pageNum) {
        return activityRecordStatisticsRepository.findActivityCouponCodeRecordsByPhoneNum(phoneNum, pageIndex, pageNum);
    }
}
